<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Box model 盒子模型</title>
    <style>
        /** {
            margin: 0;
            padding: 0;
        }*/

        /*div.box {
            width: 500px;
            height: 250px;
            background-color:antiquewhite;

            !* padding-left: 10px;
            padding-top: 20px;
            padding-right: 10px;
            padding-bottom: 20px; *!

            padding: 20px 10px;

            margin-top: 50px;
            margin-left: 50px;
            !*margin-bottom: 20px;
            margin-top: 20px;
            margin-left: 10px;
            margin-right: 10px;*!
            !* margin-bottom: 20px; *!
            !* padding-left: 20px; *!
            !* text-align: center; *!
        }*/

        * {
            margin: 0;
            padding: 0;
        }

        .box2 {
            background-color: #eccccf;
            height: 200px;
            width: 200px;

            /*margin-top: 10px;
            margin-bottom: 10px;
            margin-left: 10px;
            margin-right: 10px;*/

            /* Properties may be safely replaced with 'margin' shorthand  */
            /*margin: 10px*/

            /*margin-top: 30px;
            margin-bottom: 30px;
            margin-left: 10px;
            margin-right: 10px;*/
            /* 上面的写法可以简写成下面的方式 */
            /*margin: 30px 10px;*/

            /*margin-top: 10px;
            margin-bottom: 30px;
            margin-left: 50px;
            margin-right: 80px;*/
            /* 上面的写法可以简写成下面的方式 */
            margin: 10px 80px 30px 50px;

            /* margin 对外 */

            /* padding 对内 */
            /*padding-top: 10px;
            padding-right: 80px;
            padding-bottom: 30px;
            padding-left: 50px;*/
            /* padding 的简写规则跟 margin 一致 */
            padding: 10px 80px 30px 50px;
        }
    </style>
</head>
<body>
    <div class="box">div 1</div>
    <hr>
    <div class="box box2" style="display:inline-block;">div 2</div>
    <!--<div style="display: inline-block; width: 200px; height: 200px; background-color: #79A9CE; margin-left: 0">div demo</div>-->
    <hr>
    <div class="box">div 3</div>
</body>
</html>